QUEST_COMPLETE
[[QUEST_COMPLETE]]
This action indicates that the quest has been completed. If this action is not specified, the quest will automatically end when all heroes reach the stairs.
When the quest ends with [[QUEST_COMPLETE]]
, it is automatically checked whether the quest objective has been achieved, i.e., if the [[QUEST_OBJECTIVE_COMPLETED]] action has been used previously. If so, the player is notified that the quest has ended and been completed; otherwise, it is indicated that the quest has ended but failed.
- Example:
{[[(S), ON_OPEN]] [[ASK: You found the secret passage that will lead you outside the dungeon.
Do you want to exit?]] [[QUEST_COMPLETE]] [[ELSE]] [[LOCKED]] [[END]]}
ASK
action asks whether you want to exit or not. If the answer is "Yes", the [[QUEST_COMPLETE]]
action is triggered, and the quest ends. Also, read the example in QUEST_OBJECTIVE_COMPLETED
. By combining the examples of QUEST_OBJECTIVE_COMPLETED
and QUEST_COMPLETE
, the quest is successfully completed only if treasure has been searched for in the room beforehand; otherwise, it will end in failure.